﻿using BillHelper;
using DemoForBillOcr;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TaxAssistantBase;

namespace DemoForBillOcr
{
    public class DeclareDateTool
    {
        private static string _currentDeclareDae;
        public static string currentDeclareDae
        {
            get
            {
                return _currentDeclareDae;
            }
        }

        static DeclareDateTool()
        {
            getDeclare();
        }

        public static void getDeclare()
        {
            string temp;
            string apiurl = ApiUrlList.DECLARYDATE;//获取征期
            string date;
            string delaredate;
            var result = RestOrcTool.Post(out temp, new InvoiiceOcrModel(), apiurl);
            date = Convert.ToString(result);
            delaredate = date.Split(':')[1].Replace("\"", "");
            _currentDeclareDae = delaredate;
        }
    }
}
